<%-- 
    Document   : add
    Created on : Apr 6, 2011, 9:43:43 AM
    Author     : Noi Nho
--%>

<%@page import="dao.TourCateDAO"%>
<%@page import="dao.TourDAO"%>
<%@page import="dto.TourCategory"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Add new Tour</title>
    </head>
    <body>
        
       <br>
        <%
                    ArrayList<TourCategory> tourCates = new ArrayList<TourCategory>();
                    TourCateDAO tourCateDAO = new TourCateDAO();
                    tourCates = tourCateDAO.getAllTourCate();
        %>
        <form name="tourAdd" action="../AdminAction?page=tour&action=add" method="post">

            <select name="category">
                <option value="">-- Chose tour category --</option>
                <%

                            if (tourCates != null) {
                                for (TourCategory item : tourCates) {

                %>

                <option value="<% out.println(item.getTourCateID());%>"><% out.println(item.getCateName());%></option>
                <%
                                                }
                                }
                %>
            </select>
            <br>
            Tour Name: <input type="Text" name="tourName">
            <br>
            Price: <input type="Text" name="price">
            <br>
            Description: <input type="Text" name="description">
            <br>
            <input type="submit" name="submit" value="Ok">
            <input type="reset" name="reset" value="reset" onclick="this.form.reset();">
        </form>
    </body>
</html>
